export const codeStr = {
  htmlstr: `
  <div class="vcodeBox">
      <Vcode :show="isShow" @success="onSuccess" @close="onClose" ref="Vcode" />
    </div>
  `,
  cssStr: `
  .vue-puzzle-vcode.show_ {
  opacity: 1;
  pointer-events: auto;
  // width: 500px;
  height: 400px;
  margin: 0 100px;
}

.vue-puzzle-vcode {
  top: 100px;
}
  `,
  jsStr: `
import Vcode from "vue-puzzle-vcode";
export default {
  components: { Vcode },
  data() {
    return {
      isShow: true,
    };
  },
  methods: {
    submit() {
      this.isShow = true;
      this.$refs.Vcode.reset()
    },

    onSuccess(msg) {
      console.log(msg);
      this.isShow = true; // 通过验证后，需要手动关闭模态框
      this.$message.success("验证成功")
    },

    onClose() {
      this.isShow = true;
    },
  }
  `
}